package a.e.a;

import a.j.ld;
import a.j.tb;
import a.j.zd;

import java.io.IOException;

public class d
  implements hb
{
  private hb a;
  private hb b;
  public static boolean c;
  
  public d()
  {
    this(null, null);
  }
  
  public d(hb paramhb1, hb paramhb2)
  {
    this.a = paramhb1;
    this.b = paramhb2;
  }
  
  public void a(Object paramObject, g paramg)
    throws IOException
  {
    boolean bool = r.f;
    int k = r.e;
    a.c.d locald = (a.c.d)paramObject;
    a.j.g localg = (a.j.g)locald.c();
    tb localtb = localg.t(locald);
    paramg.a("source", locald.e().f());
    if (!bool)
    {
      paramg.a("target", locald.f().f());
      if (localtb.V() <= 0) {}
    }
    else
    {
      paramg.b("label", localtb.d(0).H());
    }
    if (!bool)
    {
      if (this.a != null) {
        paramg.a("graphics");
      }
    }
    else
    {
      this.a.a(localtb, paramg);
      paramg.b();
    }
    zd localzd = localtb.l();
    if (!bool) {
      if (localzd.f() == 0.0D) {
        if (bool) {
          break label158;
        }
      }
    }
    label158:
    int i = localzd.g() != 0.0D ? 1 : 0;
    localzd = localtb.k();
    if (!bool) {
      if (localzd.f() == 0.0D) {
        if (bool) {
          break label204;
        }
      }
    }
    label204:
    i |= (localzd.g() != 0.0D ? 1 : 0);
    if (!bool) {
      if (i != 0)
      {
        ld localld1 = localg.w(locald.e());
        ld localld2 = localg.w(locald.f());
        paramg.a("edgeAnchor");
        if (!bool) {
          if (localzd.f() != 0.0D)
          {
            if (bool) {
              break label307;
            }
            if (localld1.c() > 0.0D) {
              paramg.a("xSource", 2.0D * localzd.f() / localld1.c());
            }
          }
        }
        label307:
        if (!bool)
        {
          if (localzd.g() != 0.0D)
          {
            if (bool) {
              break label365;
            }
            if (localld1.d() > 0.0D) {
              paramg.a("ySource", 2.0D * localzd.g() / localld1.d());
            }
          }
          localzd = localtb.l();
        }
        label365:
        if (!bool) {
          if (localzd.f() != 0.0D)
          {
            if (bool) {
              break label416;
            }
            if (localld2.c() > 0.0D) {
              paramg.a("xTarget", 2.0D * localzd.f() / localld2.c());
            }
          }
        }
        label416:
        if ((bool) || ((localzd.g() != 0.0D) && (localld2.d() > 0.0D))) {
          paramg.a("yTarget", 2.0D * localzd.g() / localld2.d());
        }
        paramg.b();
      }
    }
    if (localtb.V() > 0) {
      if (this.b != null)
      {
        int j = 0;
        do
        {
          if (j >= localtb.V()) {
            break;
          }
          paramg.a("LabelGraphics");
          this.b.a(localtb.d(j), paramg);
          paramg.b();
          j++;
        } while (k == 0);
      }
    }
  }
  
  public hb a()
  {
    return this.b;
  }
  
  public void a(hb paramhb)
  {
    this.b = paramhb;
  }
  
  public hb b()
  {
    return this.a;
  }
  
  public void b(hb paramhb)
  {
    this.a = paramhb;
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.e.a.d

 * JD-Core Version:    0.7.0.1

 */